package com.blockchain.nodes.manager.service;

import com.blockchain.nodes.common.base.AjaxResult;
import com.blockchain.nodes.manager.domain.AccountAddress;
import java.util.List;
import java.util.Map;

/**
 * 账户地址 服务层
 * 
 * @author Gene Max
 * @date 2019-03-08
 */
public interface IAccountAddressService 
{
	/**
     * 查询账户地址信息
     * 
     * @param id 账户地址ID
     * @return 账户地址信息
     */
	public AccountAddress selectAccountAddressById(Long id);
	
	/**
     * 查询账户地址列表
     * 
     * @param accountAddress 账户地址信息
     * @return 账户地址集合
     */
	public List<AccountAddress> selectAccountAddressList(AccountAddress accountAddress);
	
	/**
     * 新增账户地址
     * 
     * @param accountAddress 账户地址信息
     * @return 结果
     */
	public int insertAccountAddress(AccountAddress accountAddress);
	
	/**
     * 修改账户地址
     * 
     * @param accountAddress 账户地址信息
     * @return 结果
     */
	public int updateAccountAddress(AccountAddress accountAddress);
		
	/**
     * 删除账户地址信息
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	public int deleteAccountAddressByIds(String ids);
	
	/**
     * 查询地址信息余额
     * 
     * @param walletAddress  账号地址
     * @return 结果
     */
	public String getAddressBalance(String walletAddress);
    /**
     * 更新节点金额
     * @param walletAddress 地址
     * @param nodeWalletBalance 地址余额 
     * @return
     */
	public int updateAddressBalance(String walletAddress, String nodeWalletBalance);
    /**
     * 转账交易
     * @param turnOutWalletAddress
     * @param turnInWalletAddress
     * @param walletBalance
     * @return
     */
	public AjaxResult turnAddressBalance(String transType,String turnOutWalletAddress, String turnInWalletAddress, String walletBalance);

	public void walletChange(Integer nodeId, String txId);

	
}
